require(['./config'], () => {
  require(['template', 'header', 'footer'], (template) => {
    class Category {
      constructor () {
        this.getList()
      }
      getList () {
		 
        // ?id=356756867
        const id = location.search.slice(4)
		
        $.get(`http://www.xiongmaoyouxuan.com/api/tab/${id}`, resp => {
          console.log(resp)
          if (resp.code === 200) {
            const { list } = resp.data.items
            const { cname } = resp.data.category
            $('#hotGoodsUl').html(
              template('hotGoodsUlTemplate', {
                cname,
                list
              })
            )
          }
        })
      }
    }
    new Category()
  })
})
